The default configuration file of Tailwind CSS provides the baseline settings that Tailwind uses when you start a new project. It's automatically created when you initialize a new Tailwind project using tools like npx tailwindcss init or when you install Tailwind via npm/yarn.
// tailwind.config.js
module.exports = {
mode: 'jit',
purge: [],
darkMode: false,
theme: {
extend: {},
},
variants: {
extend: {},
},
plugins: [],
}
Tailwind introduced Just-in-Time (JIT) mode to compile only the styles that are actually used in your project. This makes the compilation process faster.
By default, it's set to 'jit'.
This is an array of files or globs that Tailwind will search through to find what classes are being used in your project.
By default, it's an empty array [], meaning no files are being purged by default.
It allows you to enable dark mode variants for utilities like text color, background color, border color, etc.
By default, it's set to false.
This is where you can extend or customize Tailwind's default theme.
By default, it's an empty extend object {}.
Variants are different styles that can be applied to utilities, like hover, focus, active, etc.
By default, it's an empty extend object {}.
Tailwind allows you to extend its functionality with plugins.
By default, it's an empty array [].